import React, { memo, useContext } from 'react'
import { ThemeContext, UserContext } from './context'

export default memo(function App() {
  const user = useContext(UserContext)
  const theme = useContext(ThemeContext)
  return (
    <div>
      <h1>
        App Page name: {user.name} age: {user.age}
      </h1>
      <h2 style={{ color: theme.color, fontSize: theme.size }}>themeContext</h2>
    </div>
  )
})
